import{
	http
}from "@/common/request.js";
// 获取课程详情接口（老师）
export function getCourseInfo_teacher(orderCourseId) {
  return http.request({
    url: `/manager/course/orderCourse/${orderCourseId}`,
    method: "get",
  });
}
// 获取课程详情接口（学生）
export function getCourseInfo(id,stuId) {
  return http.request({
    url: `/student/courseStudyManager/courseInfo/${id}/${stuId}`,
    method: "get",
  });
}
// 获取学习中课程
export function learningCourseList(id) {
  return http.request({
    url: `/student/courseStudyManager/learningCourseList/${id}`,
    method: "get",
  });
}
// --------------------
// 继续-完成学习
export function keepOnOrFinish(courseStuId, type) {
  return http.request({
    url: `/student/courseStudyManager/keepOnOrFinish/${courseStuId}/${type}`,
    method: "post",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  });
}
// 课程开始学习
export function startLearning(courseId, studentId) {
  return http.request({
    url: `/student/courseStudyManager/startLearning/${courseId}/${studentId}`,
    method: "post",
  });
}
// 获取课程可选工作站列表
export function courseStudyCanUseWorkstationList(id) {
  return http.request({
    url: `/student/courseStudyManager/workstationList/${id}`,
    method: "get",
  });
}
// 课程-报名
export function selectCourse(courseId, studentId, courseSchedulingId, wid) {
  return http.request({
    url: `/student/courseStudyManager/selectCourse/${courseId}/${courseSchedulingId}/${studentId}/${wid}`,
    method: "post",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
    },
  });
}

// 获取课程详情 （教务）
export function managercourseInfo(courseId) {
  return http.request({
    url: `/manager/course/${courseId}`,
    method: "get",
  });
}
// 获取课程详情
export function courseInfo(courseId, studentId) {
  return http.request({
    url: `/student/courseStudyManager/courseInfo/${courseId}/${studentId}`,
    method: "get",
  });
}
// 获取学习主页信息(详细的课程详情)
export function homecourseInfo(courseId, studentId) {
  return http.request({
    url: `/student/courseStudyManager/homepage/${courseId}/${studentId}`,
    method: "get",
  });
}
// 获取报名课程列表
export function selectCourseList(id) {
  return http.request({
    url: `/student/courseStudyManager/selectCourseList/${id}`,
    method: "get",
  });
}
// 获取学分情况（xxxxx）
export function selectioncredit(query) {
  return http.request({
    url: `/student/selection/credit`,
    method: "get",
    params: query,
  });
}
